import { request } from '../../request/index.js'	
Page({
  data: {
    // 轮播图数组
		swiperList:[],
		// 导航数据
		cateList:[],
		// 楼层数据
		floorList:[]
  },
  //options(Object)
  onLoad: function(options){
		this.getSwiperList()
		this.getCateList()
		this.getFloorList()
	},
	// 获取轮播图数据
	getSwiperList() {
		request({url:'/home/swiperdata'})
		.then(res => {
			this.setData({
			swiperList:res
			})
		})
	},
	// 分类数据
	getCateList() {
		request({url:'/home/catitems'})
		.then(res => {
			this.setData({
			cateList:res
			})
		})
	},
	// 楼层数据
	getFloorList() {
		request({url:'/home/floordata'})
		.then(res => {
			this.setData({
			floorList:res
			})
		})
	}
});